Deployment
Project Extraction
-
First you have to extract the
whoxa-crm-web.ziporwhoxa-crm-admin.ziporwhoxa-crm-backend.zipthen you will get the following files:- whoxa-crm-backend.zip (Main backend application)
- whoxa-crm-admin.zip (Admin panel)
- whoxa-crm-web.zip (Frontend web application)
-
Upload
whoxa-crm-backend.zipto a location where you want to deploy Project using FileZilla/var/www/whoxa(This is the recommended location)
-
Install unzip to
unzipthe Project . Run following command to install unzip
sudo apt install unzip
unzip whoxa-crm-backend.zip
Configurations
- After the extraction you will see the Project files
ENV file configurations (For Whoxa CRM)
- Make a
.envfile from thedemo.envin the project on folder which containpackage.jsonwith following content.
# Whoxa CRM Environment Configuration
Port="3047"
NODE_ENV="production"
screteKey="screteKey"
DB_HOST="localhost"
DB_PORT="5432"
DB_SSL=false
DB_USERNAME="postgres"
DB_PASSWORD="your_password_here"
DB_DATABASE="whoxa_advance_crm_test"
JWT_EXPIRY="24h"
REFRESH_TOKEN_EXPIRY_DAYS="30"
BASE_URL=http://your_server_ip:3047
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
MSG91_SENDER_ID=your_msg91_sender_id
MSG91_API_KEY=your_msg91_api_key
MSG91_TEMPLATE_ID=your_msg91_template_id
IS_TWILIO_ENABLED=true
IS_MSG91_ENABLED=false
IS_CLIENT=true
ONE_SIGNAL_APP_ID=your_onesignal_app_id
ONE_SIGNAL_API_KEY=your_onesignal_api_key
ANDROID_CHANNEL_ID=your_android_channel_id
APP_NAME=Whoxa
# Email Configurations
EMAIL_SERVICE=gmail
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@gmail.com
EMAIL_PAAS=your_email_password
# WhatsApp Business Cloud API
WHATSAPP_API_VERSION=v19.0
WHATSAPP_WEBHOOK_VERIFY_TOKEN=your_webhook_verify_token
# AI Config — must be exactly 32 characters. Generate a unique value — never use a placeholder.
# Generate: node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"
# ⛔ Never change after first deployment — all encrypted AI keys in the DB will become unreadable.
AI_CONFIG_ENCRYPTION_KEY=your_exactly_32_character_encryption_key
# AI Provider API endpoints (override if using custom proxy)
OPENAI_API_URL=https://api.openai.com/v1/chat/completions
DEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions
GEMINI_API_BASE_URL=https://generativelanguage.googleapis.com/v1beta/models
# Database Pool Configuration
DB_POOL_MAX=10
DB_POOL_MIN=2
DB_POOL_ACQUIRE=30000
DB_POOL_IDLE=10000
# Redis Configuration
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
REDIS_DEBUG=true
Server Starting
- Open Terminal on the location where
package.jsonis located. - Run following command to install dependencies
npm install
- After successful running of
npm installinstall global dependency to auto configure the DB related tasks by running following command.
npm install -g sequelize sequelize-cli
- To install PM2 Globally
npm install -g pm2
- To run server run following command within the terminal where
package.jsonis located.
pm2 start index.js --name whoxa-crm
Peer Js installation
- Install
PeerJSglobally
npm install -g peer
- Run following command to run
peerserver on port 4001
pm2 start "peerjs --port 4001" --name "peerjs-server"
Auto restart on server reboot
- Run following command to save all the process running on pm2
pm2 save
- Run following command to restart all the saved processes on server restart
pm2 startup systemd
- Run following command to see running pm2 processes
pm2 status
- Run following command to see logs of a process
pm2 log {index}
Open webpages
For Web version
Frontend will be at
http://{your_server_ip}:{port_on_which_server_is_running}
VITE_API_URL={{your_server_ip}}:{{port}}/api
VITE_SOCKET_URL={{your_server_ip}}:{{port}}/
VITE_Google_MAP_KEY="Google Map API Key"
VITE_GIPHY_API_KEY="Giphy API Key"
VITE_IS_DEMO="false"
Environment Configuration Update Instructions
Step 1: Update the .env File
Navigate to the project’s root directory (the folder where package.json is located).
Open the existing .env file.
Update the required configuration values (such as API URLs, keys, ports, etc.).
Save the file after making the changes.
- Make sure all environment variables are correctly defined before proceeding to the next step.
Step 2: Install Dependencies & Create a Production Build (Frontend)
Open a terminal inside the frontend project root directory.
Run the following command to install dependencies:
yarn install
Run the following command to start the development server:
yarn dev
Or run the following command to create a production build:
yarn build
After the build process is completed, a dist folder will be generated.
Verify that all the compiled files are available inside the dist folder.
Select all files inside the dist folder and create a .zip file containing those files.
Step 3: Replace Frontend Files in Backend Project
Go to your backend project directory.
Inside the backend project, locate the folder named frontend.
Delete all existing files inside the frontend folder.
Upload the newly created frontend .zip file into the backend project.
Extract (unzip) the files inside the frontend folder.
After extraction, all new build files should be present inside the backend frontend folder.
Step 4: Restart the Backend Project
Admin Panel will be at
http://{your_server_ip}:{port_on_which_server_is_running}/admin
Default API Endpoint in both App and Web Version
http://{your_server_ip}:{port_on_which_server_is_running}/api
There are no hardcoded default credentials. You set your own admin email and password in .env before first boot:
ADMIN_EMAIL=admin@yourdomain.com
ADMIN_PASSWORD=YourStrongPassword123!
The server creates the admin account automatically on first start using these values.
Log in at http://{your_server_ip}:{port}/admin with the email and password you set.
Change your password immediately after first login via Admin Panel → Profile Settings.
:::